# Euler Problem 6
# What is the difference between the sum of all numbers 1-100
#   and the sum of their squares?
numthru = 100

import math
#################################
cycles = 50000
cycles = 1
import time
c1 = time.clock()
#for x in xrange(0xFFFFF): pass
for i in range(cycles):
    answer = 0
#################################
### program calculation start ###
#################################

    for i in range(1, numthru + 1): answer += i
    answer = answer ** 2
    for i in range(1, numthru + 1): answer -= i**2
    
#################################
###  program calculation end  ###
#################################
c2 = time.clock()
if cycles > 1: print "Time spent is %.2f ms" % ((c2-c1)*1000/cycles)
#################################
        
print 'The answer to Problem #6 is >>', answer, '<<'

        